#ifndef __UTILITY_H__
#define __UTILITY_H__

#include "GL/glew.h"

#define OFFSET_POINTER(n) (void*)(n)
#define DEG2RAD_F(x) (static_cast<float>(((x * 3.14159265358979323846) / 180.0)))

struct Model3D
{
	GLuint vao, vboVertex, vboIndex;
	int vertexCount, indexCount;
	Model3D();
	Model3D(GLuint vao, GLuint vboVertex, GLuint vboIndex, int vertexCount, int indexCount);
	void deleteBuffer();
	void Draw();
};

Model3D Loader3DModel(const float verties[], const int pervertexFloatCount, const int vertexCount,
	const unsigned int indiexs[], const int indexCount,
	GLuint posAttrib, GLuint normalAttrib = -1, GLuint texAttirb = -1);

Model3D LoadPanel(GLuint posAttrib, GLuint normalAttrib, GLuint texAttirb);
Model3D LoadBall(GLuint posAttrib, GLuint normalAttrib);
Model3D LoadCube(GLuint posAttrib, GLuint normalAttrib);
Model3D LoadPyramid(GLuint posAttrib, GLuint normalAttrib);

int getViewWidth();
int getViewHeight();


#endif

